﻿using System;
using System.Diagnostics;
using RuntimeDebugDraw.Internal;
using UnityEngine;

namespace RuntimeDebugDraw
{
	// Token: 0x02000374 RID: 884
	public static class Draw
	{
		// Token: 0x060016D1 RID: 5841 RVA: 0x000934A4 File Offset: 0x000916A4
		public static Camera GetDebugDrawCamera()
		{
			return Camera.main;
		}

		// Token: 0x060016D2 RID: 5842 RVA: 0x000934AB File Offset: 0x000916AB
		[Conditional("_DEBUG")]
		public static void DrawLine(Vector3 start, Vector3 end, Color color, float duration, bool depthTest)
		{
			Draw.CheckAndBuildHiddenRTDrawObject();
			Draw._rtDraw.RegisterLine(start, end, color, duration, !depthTest);
		}

		// Token: 0x060016D3 RID: 5843 RVA: 0x000934C5 File Offset: 0x000916C5
		[Conditional("_DEBUG")]
		public static void DrawRay(Vector3 start, Vector3 dir, Color color, float duration, bool depthTest)
		{
			Draw.CheckAndBuildHiddenRTDrawObject();
			Draw._rtDraw.RegisterLine(start, start + dir, color, duration, !depthTest);
		}

		// Token: 0x060016D4 RID: 5844 RVA: 0x000934E5 File Offset: 0x000916E5
		[Conditional("_DEBUG")]
		public static void DrawText(Vector3 pos, string text, Color color, int size, float duration, bool popUp)
		{
			Draw.CheckAndBuildHiddenRTDrawObject();
			Draw._rtDraw.RegisterDrawText(pos, text, color, size, duration, popUp);
		}

		// Token: 0x060016D5 RID: 5845 RVA: 0x000934FE File Offset: 0x000916FE
		[Conditional("_DEBUG")]
		public static void AttachText(Transform transform, Func<string> strFunc, Vector3 offset, Color color, int size)
		{
			Draw.CheckAndBuildHiddenRTDrawObject();
			Draw._rtDraw.RegisterAttachText(transform, strFunc, offset, color, size);
		}

		// Token: 0x060016D6 RID: 5846 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawLine(Vector3 start, Vector3 end)
		{
		}

		// Token: 0x060016D7 RID: 5847 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawLine(Vector3 start, Vector3 end, Color color)
		{
		}

		// Token: 0x060016D8 RID: 5848 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawLine(Vector3 start, Vector3 end, Color color, float duration)
		{
		}

		// Token: 0x060016D9 RID: 5849 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawRay(Vector3 start, Vector3 dir)
		{
		}

		// Token: 0x060016DA RID: 5850 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawRay(Vector3 start, Vector3 dir, Color color)
		{
		}

		// Token: 0x060016DB RID: 5851 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawRay(Vector3 start, Vector3 dir, Color color, float duration)
		{
		}

		// Token: 0x060016DC RID: 5852 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawText(Vector3 pos, string text)
		{
		}

		// Token: 0x060016DD RID: 5853 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawText(Vector3 pos, string text, Color color)
		{
		}

		// Token: 0x060016DE RID: 5854 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawText(Vector3 pos, string text, Color color, int size)
		{
		}

		// Token: 0x060016DF RID: 5855 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void DrawText(Vector3 pos, string text, Color color, int size, float duration)
		{
		}

		// Token: 0x060016E0 RID: 5856 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void AttachText(Transform transform, Func<string> strFunc)
		{
		}

		// Token: 0x060016E1 RID: 5857 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void AttachText(Transform transform, Func<string> strFunc, Vector3 offset)
		{
		}

		// Token: 0x060016E2 RID: 5858 RVA: 0x00002973 File Offset: 0x00000B73
		[Conditional("_DEBUG")]
		public static void AttachText(Transform transform, Func<string> strFunc, Vector3 offset, Color color)
		{
		}

		// Token: 0x060016E3 RID: 5859 RVA: 0x00093518 File Offset: 0x00091718
		private static void CheckAndBuildHiddenRTDrawObject()
		{
			if (Draw._rtDraw == null)
			{
				GameObject gameObject = new GameObject("________HIDDEN_C4F6A87F298241078E21C0D7C1D87A76_");
				Draw._rtDraw = new GameObject("________HIDDEN_9D08E9B9785041CD863FF172480C31B2_")
				{
					transform = 
					{
						parent = gameObject.transform
					}
				}.AddComponent<RuntimeDebugDraw>();
				gameObject.hideFlags = HideFlags.HideInHierarchy;
				UnityEngine.Object.DontDestroyOnLoad(gameObject);
			}
		}

		// Token: 0x04001970 RID: 6512
		public const int DrawLineLayer = 4;

		// Token: 0x04001971 RID: 6513
		public const int DrawTextDefaultSize = 12;

		// Token: 0x04001972 RID: 6514
		public static Color DrawDefaultColor = Color.white;

		// Token: 0x04001973 RID: 6515
		private static RuntimeDebugDraw _rtDraw;
	}
}
